<!--  -->
<template>
  <div>
    <div class="container">
      <div
        class="back"
        style="display: flex; align-items: center"
        :style="{ backgroundColor, backgroundColor }"
        @click="$router.back()"
      >
        <i class="iconfont icon-fanhui" :style="{ color: iconColor }"></i>
      </div>
    </div>
  </div>
</template>

<script>
/**
 *
 *
 * @param {String} [backgroundColor=transparent] 背景颜色
 * @param {isWidth100} [isWidth100=false]
 * @example
 *  <BackTo />
 *  请保证  使用时的页面未有超出视口的问题
 */
export default {
  name: "BackTo",
  data() {
    return {};
  },
  props: {
    backgroundColor: { type: String, value: "transparent" },
    iconColor: {
      type: String,
      value: "#eee",
    },
  },
  components: {},

  computed: {},

  methods: {},
};
</script>
<style lang="stylus" rel="stylesheet/stylus" scoped>
.container
  height: 50px;
  &::after
    content: "";
    display: block;
    height: 53px;
.back
  position: fixed;
  top: 0;
  height: 50px;
  text-indent: 10px;

  top:0px;
  i
    font-size: 20px
</style>
